import enum
from collections import namedtuple


class MyEnum(enum.Enum):
    ignore_pattern = [".*\.pyc", ".*/__pycache__", ".*/node_modules", ".*/\.svn", ".*/go/bin", ".*/go/pkg", "ignore"]
    # key
    root_pprogram = "pprogram_backup"
    pprogram = "pprogram"
    root_pkg = "pkg_backup"
    restore_auto = "auto"
    restore_all = "all"
    # windows 平台名
    win = "win"
    # 中科大软件源名称
    ustc = "ustc"
    # 清华大学软件源名称
    tuna = "tuna"
    py_module_file = "py_module_file"
    normal_cmd = "linux_cmd"
    bash = "bash"
    bash_alias = "alias"
    bash_cmd = "cmd"
    sudo_cmd = "sudo"
    host_url = "host"
    laptop_soft = "laptop"
    dev_soft = "dev"
    third_repos = "custom_repos"
    official_repos = "repos"
    opensuse = "opensuse"
    ubuntu = "ubuntu"
    server_mode = "server"
    laptop_mode = "laptop"

    # env name
    # pypi 地址
    pip_index = "pipIndex"
    user_name = "userName"
    user_home = "userHome"
    config_root = "config_root"
    # opensuse 版本， 如15.0
    linux_version = "linuxVersion"
    # opensuse版本全名， 如openSUSE_Leap_15.0
    full_suse_version = "fullSUSEVersion"
    mirror_url = "mirrorURL"
    # ubuntu发布名
    ubuntu_code_name = "ubuntuCodeName"
    mirror_name = "mirrorName"


Runner = namedtuple("Runner", ["desc", "func"])
